<template>
  <div>
    <preHeader></preHeader>
    <div class="top-block"></div>
    <div class="custom-list">
    <div class="item">
      <mt-cell :title="item.username" :value="item.tel" v-for='(item,index) in membersInfo' :key='index'></mt-cell>
    </div>
    </div>
  </div>
</template>

<script>
  import {get_members_by_type} from '@/api/';
  export default {
    components: {
    },
    data(){
      return{
        tel:'',
        id:'',//路由参数
        membersInfo:'',
      }
    },
    methods:{
      getMembers(){
        this.tel = JSON.parse(localStorage.getItem('tel'));
        get_members_by_type({tel:this.tel,leixing:this.id}).then(res =>{
          console.log(res)
          this.membersInfo = res.data;
        })
      }

    },
    mounted() {
      this.id = this.$route.query.id;
      this.getMembers();
    }
  }
</script>

<style scoped>

</style>
